home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
001
/
pibt3sp1.arc
/
MINMAX.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1985-01-07
|
4KB
|
69 lines
(*----------------------------------------------------------------------*)
(* Min --- Find minimum of two integers *)
(*----------------------------------------------------------------------*)
Function Min( A, B: Integer ) : Integer;
(*----------------------------------------------------------------------*)
(* *)
(* Function: Min *)
(* *)
(* Purpose: Returns smaller of two numbers *)
(* *)
(* Calling sequence: *)
(* *)
(* Smaller := MIN( A , B ) : Integer; *)
(* *)
(* A --- 1st input integer number *)
(* B --- 2nd input integer number *)
(* Smaller --- smaller of A, B returned *)
(* *)
(* *)
(* Calls: None *)
(* *)
(* *)
(*----------------------------------------------------------------------*)
Begin (* Min *)
IF A < B Then
Min := A
Else
Min := B;
End (* Min *);
(*----------------------------------------------------------------------*)
(* Max --- Find maximum of two integers *)
(*----------------------------------------------------------------------*)
Function Max( A, B: Integer ) : Integer;
(*----------------------------------------------------------------------*)
(* *)
(* Function: Max *)
(* *)
(* Purpose: Returns larger of two numbers *)
(* *)
(* Calling sequence: *)
(* *)
(* Larger := MAX( A , B ) : Integer; *)
(* *)
(* A --- 1st input integer number *)
(* B --- 2nd input integer number *)
(* Larger --- Larger of A, B returned *)
(* *)
(* *)
(* Calls: None *)
(* *)
(*----------------------------------------------------------------------*)
Begin (* Max *)
IF A > B Then
Max := A
Else
Max := B;
End (* Max *);